<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%@include file="/common/common.jsp" %>
<title>Main</title>
</head>
<body class="easyui-layout">
		<div data-options="region:'north',title:'SCM_Demo by Mason',split:true" style="height:150px;">
			欢迎您，${sessionScope.exsitUser.accLogin} 
			<a href="${proPath}/base/goURL/jschart/jscharts.action">图表</a>
		</div>
		<div id="win" ></div>
		
		<div data-options="region:'west',title:'导航菜单',split:true" style="width:180px;">
			<div id="aa" class="easyui-accordion" style="width:300px;height:200px;" data-options="fit:true">
				
				<div title="系统介绍" data-options="iconCls:'icon-tip'" style="overflow:auto;padding:10px;">
					<h3 style="color:#0099FF;">Mason</h3>
					<p>闲来无事做着玩</p>
				</div>
				
				<div title="基础数据录入" data-options="selected:true" style="padding:10px;">
					<ul style="list-style:none;padding:0px;margin:0px;">
						<!--href="${proPath}/base/goURL/supplier/supplierlist.action" 也是传给方法的参数，详见BaseAction的定义 -->
						<li style="padding: 6px;">
							<a href="${proPath}/base/goURL/supplier/supplierlist.action" title="供应商管理" style="text-decoration: none;display: block;font-weight:bold;">供应商管理</a>
						</li>
						<li style="padding: 6px;">
							<a href="${proPath}/base/goURL/goods/goodslist.action" title="商品管理" style="text-decoration: none;display: block;font-weight:bold;">商品管理</a>
						</li>
					</ul>
				</div>
				
				<div title="采购管理">
					<ul style="list-style:none;padding:0px;margin:0px;">
						<li style="padding: 6px;">
							<a href="${proPath}/base/goURL/order/insert.action" title="商品采购" style="text-decoration: none;display: block;font-weight:bold;">商品采购</a>
						</li>
						<li style="padding: 6px;">
							<a href="http://www.baidu.com" title="商品退货" style="text-decoration: none;display: block;font-weight:bold;">商品退货</a>
						</li>
					</ul>
				</div>
				
				<div title="报表查询">
					<ul style="list-style:none;padding:0px;margin:0px;">
						<li style="padding: 6px;">
							<a href="${proPath}/base/goURL/jschart/selectsupplier.action" title="供应商采购金额统计" style="text-decoration: none;display: block;font-weight:bold;">供应商采购金额统计</a>
						</li>
					</ul>
				</div>
				
			</div>
		</div>

		<div data-options="region:'center',title:'主要信息'">
			<div id="tt" class="easyui-tabs" style="width:500px;height:250px;" data-options="fit:true">
				<div title="介绍" style="padding:10px;">
					<h2 style="color: brown;">Mason@NKU</h2>
				</div>
			</div>
		</div>
		
		<script type="text/javascript">	
			$(function() {
				//选项卡相关
				$("a[title]").click(function() {
				   	var text = this.href;
					//alert(text);
					//alert($("#tt").tabs("exists","系统介绍"));
					if ($("#tt").tabs("exists", this.title)) {
						//存在时选中
						$("#tt").tabs("select", this.title);
					} else {
						//不存在时创建
						$("#tt").tabs("add", {
							title : this.title,
							closable : true,
							//href可以加载内容填充到选项卡，但局限于body内容,但有时候页面有Js时，处理不了
							//href : text
							//可以加载内容填充到选项卡，页面有Js时，也可加载
							content:"<iframe src='"+text+"' title='"+ this.title +"' height='100%' width='100%' frameborder='0px' ></iframe>"
						});
					}
					return false; //重点,防止打开新的页面
				});
				
			});
		</script>
	</body>
</html>